_Append plain text
(16 actions, 15 KB)
0 Comment
https://developers.notion.com/reference/rich-text
1 Get Dictionary from
[Shortcut Input]
»
2
4
10
12
14
2 Get Dictionary Value for
newContent
in
[1 Dictionary]
»
3 Run Shortcut
Sanity Check JSON String
➔ newContent
»
10
12
Input
:
[2 Dictionary Value]
Workflow
:
{ "workflowIdentifier": "01C66C6E-825F-4ABF-90D6-56541924A04C", "workflowName": "Sanity Check JSON String", "isSelf": false }
4 Run Shortcut
_Retrieve a page property item
»
5
6
Input
:
[1 Dictionary]
Workflow
:
{ "workflowIdentifier": "2E57F56D-8D50-4AED-906F-AC96B6EDE789", "workflowName": "_Retrieve a page property item", "isSelf": false }
5 If
[4 Shortcut Result]
has any value
6 Repeat with Each in
[4 Shortcut Result]
7 Get Dictionary Value for
rich_text
in
[Repeat Item
as Dictionary
]
8 End Repeat with Each »
9 Combine Text
[8 Repeat Results]
with
Custom
➔ oldContent
»
TextCustomSeparator
:
,
10 Text
➔ Request Body
{ "properties":{ "
[1 Dictionary
.propertyName
]
":{ "rich_text":[
[9 oldContent]
, { "type":"text", "text":{ "content":"\n
[3 newContent]
" } } ] } } }
11 Otherwise ▵
5
12 Text
➔ Request Body
{ "properties":{ "
[1 Dictionary
.propertyName
]
":{ "rich_text":[{ "type":"text", "text":{ "content":"
[3 newContent]
" } }] } } }
13 End If »
14 Dictionary »
{ "pageId": "
[1 Dictionary
.pageId
]
", "requestBody": "
[13 requestBody]
" }
15 Run Shortcut
Update page properties
Input
:
[14 Dictionary]
Workflow
:
{ "workflowIdentifier": "8AFE4122-3C94-40F9-8410-0629BFD2B931", "workflowName": "Update page properties", "isSelf": false }